package com.atguigu.sparsearray;

import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class SavaSparseArrayToFile {
    public static void SavaSparseArrayToFile(int [][] sparseArr,String fileName){
        try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(fileName))) {
            oos.writeObject(sparseArr);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
